<template>
  <el-steps :space="200" :active="isActiveIndex" finish-status="success" align-center>
    <el-step title="基本信息"></el-step>
    <el-step title="商品参数"></el-step>
    <el-step title="商品属性"></el-step>
    <el-step title="商品图片"></el-step>
    <el-step title="商品内容"></el-step>
    <el-step title="完成"></el-step>
  </el-steps>
</template>

<script>
export default {
  data() {
    return {
      isActiveIndex: 0
    }
  },
  methods: {
    getTagClick(index) { // 接收到tag栏点击事件触发
    // console.log(index);
      return this.isActiveIndex = index;
    }
  },
  created() {
    this.$bus.$on('tagClick', index => this.getTagClick(index));
  },
  destroyed() {
    this.$bus.$off('tagClick');
  }
}
</script>

<style lang="scss" scoped>
  .el-steps{
    margin-top: 15px; 
    margin-bottom: 30px;
  }
</style>